public class TextIssues5 {
    public static void main(String[] args) {
        System.out.println(fun(40));
    }

    public static int fun(int n){
        if (n == 1 || n == 2){
            return 1;
        }else {
            return fun(n-1) + fun(n-2);
        }
    }
}
/*    public static void main(String[] args) {
        System.out.println(fun(10));
    }
    public static int fun(int n){
        int sum1 = 0;
        int sum2 = 0;
        int sum = 0;
        for (int i = 1; i <= n ; i++) {
            if (i == 1 || i == 2){
                sum1 = 1;
                sum2 = 1;
            }else {
                sum = sum1 + sum2;
                sum1 = sum2;
                sum2 = sum;
            }
        }
        if (n == 1 || n == 2){
            return 1;
        }else {
            return sum;
        }
    }
}*/
